package acwing;

import javax.print.DocFlavor;
import java.io.*;
import java.util.*;

public class ac871 {
    static StreamTokenizer in = new StreamTokenizer(new BufferedReader(new InputStreamReader(System.in)));
    static PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));
    static BufferedReader bin = new BufferedReader(new InputStreamReader(System.in));
    static final int mod = (int) 1e9 + 7;
    static long n, ans = 1;

    static int cin() throws IOException {
        in.nextToken();
        return (int) in.nval;
    }

    public static void main(String[] args) throws IOException {
        n = cin();
        HashMap<Integer, Integer> res = new HashMap<>();
        while ( n -- > 0 ) {
            int x = cin();
            for (int i = 2; i <= x / i; i ++ ) {
                while (x % i == 0 ) {
                    x /= i;
                    res.put(i, res.getOrDefault(i, 0) + 1);
                }
            }
            if (x > 1) res.put(x, res.getOrDefault(x, 0) + 1);
        }

        for (long k : res.keySet()) {
            long b = res.get((int)k);
            long tmp = 1;
            while (b -- > 0 ) tmp = (tmp * k + 1) % mod;
            ans = ans * tmp % mod;
        }
        out.println(ans);
        out.close();
    }
}
